﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace T_Person.BaseRep.Migrations
{
    public partial class 更新人员数据库 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Employee",
                columns: table => new
                {
                    Eid = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Ename = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false),
                    Esex = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false),
                    Ephone = table.Column<string>(type: "nvarchar(18)", maxLength: 18, nullable: false),
                    Eschool = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: false),
                    Especialized = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    Eaddress = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
                    Eorigin = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    Emarriage = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: true),
                    Ebirthday = table.Column<DateTime>(type: "datetime2", nullable: true),
                    Email = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
                    EcardId = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    EntrtDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DepartId = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: true),
                    PostsId = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: true),
                    EmployeeType = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: true),
                    EmployeeStyle = table.Column<int>(type: "int", nullable: false),
                    Eshangji = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: true),
                    Ezhengzhimianmao = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: true),
                    Enation = table.Column<string>(type: "nvarchar(6)", maxLength: 6, nullable: true),
                    CreateById = table.Column<int>(type: "int", nullable: true),
                    CreateBy = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    CreateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateBy = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    AuditState = table.Column<int>(type: "int", nullable: true),
                    UpdateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDel = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Employee", x => x.Eid);
                });

            migrationBuilder.CreateTable(
                name: "Personnel",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Dname = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: true),
                    EmployeeId = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    SuperiorId = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    EntryDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    Desc = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
                    LastDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DimissionText = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
                    FiledDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    ProbationText = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
                    CompanyText = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
                    RLZId = table.Column<int>(type: "int", nullable: false),
                    CreateById = table.Column<int>(type: "int", nullable: true),
                    CreateBy = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    CreateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateBy = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    AuditState = table.Column<int>(type: "int", nullable: true),
                    UpdateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDel = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Personnel", x => x.Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Employee");

            migrationBuilder.DropTable(
                name: "Personnel");
        }
    }
}
